<template>
    <div>
        <a-modal
        title="添加问题"
        :visible="visible"
        @ok="handleOk"
        @cancel="visible = false"
        >
            <div style="display:flex;justify-content:center;flex:1;align-items:center;">
                <span 
                    style="display: inline-block; text-align: center; font-weight: 600; font-size: 16px;line-height:32px;
                    padding-left:5px;font-family: simHei; color: rgba(0, 0, 0, 0.85);background-color: #e6f7ff;height:32px;
                    "
                >
                    发现问题人员：
                </span>
                <a-select :default-value="ffxryid" style="margin-right:10px;height:32px;min-width:117px;" @change="PersonnelDiscoveredChange" :key="selectKey">
                    <a-select-option v-for="(item,index) in PersonnelDiscoveredProblemList" :key="item.userid" v-if="index">
                        {{item.name}}
                    </a-select-option>
                </a-select>
            </div>
        </a-modal>
    </div>
</template>
<script>
export default {
    components:{

    },
    props:{

    },
    data(){
        return{
            visible:false,
            ffxryid:'',
            PersonnelDiscoveredProblemList:[],
            selectKey:null,
        }
    },
    watch:{

    },
    mounted(){
        
    },
    methods:{
        getData(row,id){
            this.PersonnelDiscoveredProblemList = row
            this.ffxryid = id
            this.selectKey = Date.now()
        },
        PersonnelDiscoveredChange(val){
            this.ffxryid = val
        },
        handleOk(){
            if(this.ffxryid){
                this.$emit('addProblemChange',this.ffxryid)
            }else{
                this.$message.warning('请先选择发现问题人员')
            }
        },
    }
}
</script>
<style lang="less">

</style>